命名空间 | 函数 | 变量
LineScanSoftwareTrigger/LineScanSoftwareTrigger.py 文件参考

命名空间

 LineScanSoftwareTrigger
 

函数

def image_callback (pData, pFrameInfo, pUser)
 
def press_any_key_exit ()
 
def software_trigger_thread (cam_ins=0, cmd_value="")
 
def check_feature_node_access (cam_ins, node_name)
 

变量

bool g_exit = False
 
 winfun_ctype = CFUNCTYPE
 
 stFrameInfo = POINTER(MV_FRAME_OUT_INFO_EX)
 
 pData = POINTER(c_ubyte)
 
 FrameInfoCallBack = winfun_ctype(None, pData, stFrameInfo, c_void_p)
 
 CALL_BACK_FUN = FrameInfoCallBack(image_callback)
 
 deviceList = MV_CC_DEVICE_INFO_LIST()
 
tuple tlayerType
 
 ret = MvCamera.MV_CC_EnumDevices(tlayerType, deviceList)
 
 mvcc_dev_info = cast(deviceList.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents
 
string strModeName = ""
 
tuple nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24)
 
tuple nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16)
 
tuple nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8)
 
tuple nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff)
 
string strSerialNumber = ""
 
 nConnectionNum = input("please input the number of the device to connect:")
 
 cam = MvCamera()
 
 stDeviceList = cast(deviceList.pDeviceInfo[int(nConnectionNum)], POINTER(MV_CC_DEVICE_INFO)).contents
 
 nPacketSize = cam.MV_CC_GetOptimalPacketSize()
 
string trigger_cmd = "FrameTriggerSoftware"
 
 hThreadHandle = threading.Thread(target=software_trigger_thread, args=(cam, trigger_cmd))